home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Champak 138
/
Volume 138 Aug 19 2011 - Damaged.iso
/
Games
/
juicy_lucy.swf
/
scripts
/
DefineButton2_351
/
BUTTONCONDACTION on(release).as
Wrap
Text File
|
2011-08-19
|
1KB
|
49 lines
on(release){
if(txtName1.text == "")
{
condition1 = "";
err.text = "Please fill in your name.";
}
else
{
condition1 = "ok";
}
if(txtCountry.text == "" and condition1 == "ok")
{
condition2 = "";
err.text = "Please fill in your country name.";
}
else
{
condition2 = "ok";
}
if(yourAge.text == "" and condition1 == "ok" and condition2 == "ok")
{
condition3 = "";
err.text = "Please fill in your age.";
}
else
{
condition3 = "ok";
}
if(condition1 == "ok" && condition2 == "ok" && condition3 == "ok")
{
trace("Name::" + txtName1.text);
trace("Score::" + score);
var result_lv1 = new LoadVars();
var my_lv1 = new LoadVars();
my_lv1.yourName1 = txtName1.text;
my_lv1.country = txtCountry.text;
my_lv1.age = yourAge.text;
my_lv1.yourScore = score;
result_lv1.onLoad = function(§success:Boolean§)
{
if(!success)
{
}
};
my_lv1.sendAndLoad("sendScore.php",result_lv1,"POST");
gotoAndStop("thankyou1");
}
}